package com.zhongketech.sunflower;

import com.zhongketech.sunflower.database.Data;
import com.zhongketech.sunflower.util.Constants;
import com.zhongketech.sunflower.util.Utilities;

import android.app.Application;
import android.content.Context;


public class MyApplication extends Application{

	private static final MyApplication instance = new MyApplication();
	private static Context context = null;

	public static MyApplication getInstance() {
		return instance;
	}

	@Override
	public void onCreate() {
		// TODO Auto-generated method stub
		super.onCreate();
		Utilities.logCat("MyApplication", "MyApplication onCreate",Constants.LOG_ONLYSHELL);
		context = this.getApplicationContext();
		//MySQLiteDatabase.init(context);

		
		new Thread() {
			@Override
			public void run() {
				Data.getinstance();
			}
		}.start();


	}
	public static Context getAppContext(){  
		return context;  
	}  

	@Override  
	public void onLowMemory() {  
		super.onLowMemory();  
	}  
}
